package user;
import operation.*;
import book.BookList;
import book.*;
import book.Book;

abstract public class User {
    private String name;
    private String num;
    private String Code;
    protected IOperation[] operations;

    public User(String name, String num, String code) {
        this.name = name;
        this.num = num;
        Code = code;
    }

    public String getName() {
        return name;
    }

    public String getNum() {
        return num;
    }

    public String getCode() {
        return Code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public void setCode(String code) {
        Code = code;
    }
    abstract public void menu();
    public static void land() {
        System.out.println("0.退出");
        System.out.println("1.普通用户");
        System.out.println("2.管理员");
        System.out.println("请选择");
    }
    public void doOperation(int choice, BookList bookList) {
        this.operations[choice].work(bookList);
    }
}
